{extend name="../../public/admin"}
{block name="title"}看图{/block}
{block name="body"}

{eq name="type" value="1"}
<img src="{$data}" alt="" style="width: 40%;" class="center-block">
{else/}
<iframe src="{:url('pdf')}?url={$data}" frameborder="0" style="width: 40%;" class="center-block"></iframe>
{/eq}

{/block}
{block name="js"}
<script>
    $(function () {
        $('iframe').css({
            height:function () {
                return $(window).height();
            }
        })
    });
</script>
{/block}